package com.aramis.mydytt.ui.download

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.lifecycle.ViewModelProvider
import com.aramis.mydytt.R
import com.aramis.mydytt.ui.base.BaseFragment

/**
 * 下载Fragment
 */
class MainDownloadFragment : BaseFragment() {

    private lateinit var mainDownloadModel: MainDownloadModel

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        mainDownloadModel =
            ViewModelProvider(this).get(MainDownloadModel::class.java)
        val root = inflater.inflate(R.layout.fragment_main_down, container, false)
        val textView: TextView = root.findViewById(R.id.text_home)
        mainDownloadModel.text.observe(viewLifecycleOwner,  {
            textView.text = it
        })
        return root
    }
}